index.md (4362B)
1 +++ 2 title = "MAC: Protocols" 3 +++ 4 5 # MAC: Protocols 6 Multiple access protocols 7 8 - ALOHA 9 - Hawaii, early 1970s 10 - used short-trange radios, each user terminal sharing the same upstream frequency to send frames to central computer 11 - pure: 12 - let users transmit data 13 - the centre computer rebroadcasts frame to all stations, and sender can listen to see if its frame came through 14 - if frame was destroyed (incorrect checksums on both frames), sender waits a random amount of time and then resends 15 16 ![screenshot.png](82c50afd129d1fb069dd82c5464336fc.png) 17 18 - slotted: 19 - time is in discrete intervals called slots 20 - station is not allowed to send when a user types a line 21 - Carrier Sense Multiple Access Protocols (contention) 22 - 1-persistent CSMA (transmits with a probability of 1 with idle channel) 23 - when station wants to send data, it listens to the channel first 24 - if channel is idle, it sends the data 25 - otherwise, it waits until the channel becomes idle and then sends 26 - on collision, station waits a random amount of time and starts again 27 - nonpersistent CSMA 28 - station senses the channel and sends if the channel is idle 29 - if in use, does not continually sense but waits a random period of time before repeating the algorithm 30 - better channel utilisation but longer delays 31 - p-persistent CSMA (applies to slotted channels) 32 - station senses the channel 33 - if idle, transmits with a probability *p* 34 - with a probability q = 1-p, defers until next slot 35 - if next slot also idle, either transmits or defers again with probabilities *p* and *q* 36 - CSMA/CD (CSMA with Collision Detection) 37 - station’s hardware listens to channel while it is transmitting 38 - if signal in differs from signal out, a collision is occurring 39 - at t0, a station has finished transmitting frame and any other can start transmitting (collisions may and will occur): 40 41 ![screenshot.png](0c6bc5fde956ff03ff3b83abbf56b84a.png) 42 43 - Collision-free 44 - Bit-map protocol 45 - an example of a reservation protocol 46 - each contention period consists of N slots 47 - if station *j* announces that it has a frame to send by transmitting a 1 bit in slot *j* 48 - after all N slots pass by, each station can transmit without colliding without others because it has knowledge of when they transmit 49 50 ![screenshot.png](e6997d1baf716429e079ac91c1f265c2.png) 51 52 - Token passing (sesh circle) 53 - stations pass small message (“token”) representing permission to send 54 - either pass, or send frame then pass 55 - token ring — stations are connected one to the next in circle, the token is passed around like a joint 56 - token bus — stations are not in a circle, but connected via a token bus which is used to pass the token in a predefined sequence 57 - Binary countdown 58 - a station that wants to use the channel broadcasts its address a binary bit string, starting with high-order bit (all addresses same length) 59 - bits in each address position from different stations are ORed together by channel 60 - as soon as a station sees that its 0 bit has been overwritten to a 1, it gives up and lets the other stations transmit 61 - Limited-contention 62 - Adaptive tree walk 63 - stations are leaves of a binary tree 64 - in first contention slot after a frame transmission (slot 0), all stations try to acquire the channel 65 - if successful, alright ¯\_(ツ)_/¯ 66 - if collision, during slot 1 only stations in node 2 can compete 67 - if acquired, next slot after frame is reserved for stations under node 3 68 - otherwise, node 4 competes in slot 2 69 70 ![screenshot.png](a1075f2fd31bfd47a46f0397d03e8ffb.png) 71 72 - Wireless LAN protocols 73 - hidden terminal problem — station may not detect a potential competitor because it’s too far away 74 - MACA (Multiple Access with Collision Avoidance) 75 - sender sends a RTS (request to send) along with length of upcoming data frame 76 - receiver replies with CTS (clear to send) with copied data length 77 - when sender receives CTS, it begins data transmission 78 - if a station overhears a RTS and CTS, it remains silent during time in CTS frame